home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 2 / LSD and 17bit Compendium Deluxe - Volume II.iso / a / prog / misc / interfaces3_5.lha / Interfaces / Classface.mod < prev    next >
Text File  |  1994-11-06  |  5KB  |  94 lines

  1. (*(***********************************************************************
  2.  
  3. :Module.      Classface.mod
  4. :Author.      Albert Weinert  [awn]
  5. :Copyright.   Albert Weinert
  6. :Copyright.   permission granted for inclusion into AmigaOberon library
  7. :Contents.    Interface zur Classface Programmierung mit Amiga Oberon.
  8. :Imports.     needs `Classface.o', assemble Classface.asm therefore
  9. :History.     0.0   [awn] 13-Jun-1993 : Erstellt
  10. :History.     0.1   [awn] 16-Jun-1993 : Makro-Umsetzungen und die ProcDefinition
  11. :History.           mit Utility.InitHook() erstellt, bzw. definiert.
  12. :History.     0.2   [hG]  06 Jul 1993 : an Oberon üblichen Stil angepasst.
  13. :Histroy.     1.0   [hG] renamed to Classface, some optical clean up
  14. :Histroy.     40.15 [hG] bumped version/revision
  15. :Histroy.           further notes see Interfaces package ReadMe
  16. :Version.     $VER: Classface.mod 40.15 (6.11.94) Oberon 3.5
  17.  
  18. ***********************************************************************)*)
  19.  
  20. MODULE Classface;
  21.  
  22. (* $StackChk- $NilChk- $ReturnChk- $ClearVars- *)
  23. (* $JOIN Classface.o *)
  24.  
  25. IMPORT
  26.   e * := Exec,
  27.   I * := Intuition,
  28.   SYSTEM,
  29.   u * := Utility;
  30.  
  31. TYPE
  32.   ObjectPtr * = e.APTR;
  33.  
  34. (* the next three procedure should come from Intuition.mod,
  35. ** since they are defined in classes.h which is indegrated
  36. ** into Intuition.mod
  37. *)
  38.  
  39. PROCEDURE InstData*(cl{8}: I.IClassPtr; o{9}: ObjectPtr): e.APTR;
  40. BEGIN
  41.   RETURN  (SYSTEM.VAL(LONGINT,o)+LONG(cl.instOffset));
  42. END InstData;
  43.  
  44. PROCEDURE SizeOfInstance*(cl{8}: I.IClassPtr): LONGINT;
  45. BEGIN
  46.   RETURN cl.instOffset+cl.instSize+SIZE(I.Object);
  47. END SizeOfInstance;
  48.  
  49. PROCEDURE OClass*(o{8}: I.ObjectPtr): I.IClassPtr;
  50. BEGIN (* $RangeChk- *)
  51.   o := SYSTEM.VAL(ObjectPtr,SYSTEM.VAL(LONGINT,o)-SIZE(I.Object));
  52.   RETURN o.class; (* $RangeChk= *)
  53. END OClass;
  54.  
  55. PROCEDURE CoerceMethodA  * {"_a_CoerceMethodA"} (cl{8}     : I.IClassPtr;
  56.                                                  obj{10}   : ObjectPtr;
  57.                                                  msg{9}    : I.Msg): e.APTR;
  58. PROCEDURE CoercemethodA  * {"_a_CoerceMethodA"} (cl{8}     : I.IClassPtr;
  59.                                                  obj{10}   : ObjectPtr;
  60.                                                  msg{9}    : I.Msg);
  61. PROCEDURE CoerceMethod   * {"_a_CoerceMethodA"} (cl{8}     : I.IClassPtr;
  62.                                                  obj{10}   : ObjectPtr;
  63.                                                  msg{9}..  : u.Tag): e.APTR;
  64. PROCEDURE Coercemethod   * {"_a_CoerceMethodA"} (cl{8}     : I.IClassPtr;
  65.                                                  obj{10}   : ObjectPtr;
  66.                                                  msg{9}..  : u.Tag);
  67. PROCEDURE DoMethodA      * {"_a_DoMethodA"}     (obj{10}   : ObjectPtr;
  68.                                                  msg{9}    : I.Msg): e.APTR;
  69. PROCEDURE DomethodA      * {"_a_DoMethodA"}     (obj{10}   : ObjectPtr;
  70.                                                  msg{9}    : I.Msg);
  71. PROCEDURE DoMethod       * {"_a_DoMethodA"}     (obj{10}   : ObjectPtr;
  72.                                                  msg{9}..  : u.Tag): e.APTR;
  73. PROCEDURE Domethod       * {"_a_DoMethodA"}     (obj{10}   : ObjectPtr;
  74.                                                  msg{9}..  : u.Tag);
  75. PROCEDURE DoSuperMethodA * {"_a_DoSuperMethodA"}(cl{8}     : I.IClassPtr;
  76.                                                  obj{10}   : ObjectPtr;
  77.                                                  msg{9}    : I.Msg): e.APTR;
  78. PROCEDURE DoSupermethodA * {"_a_DoSuperMethodA"}(cl{8}     : I.IClassPtr;
  79.                                                  obj{10}   : ObjectPtr;
  80.                                                  msg{9}    : I.Msg);
  81. PROCEDURE DoSuperMethod  * {"_a_DoSuperMethodA"}(cl{8}     : I.IClassPtr;
  82.                                                  obj{10}   : ObjectPtr;
  83.                                                  msg{9}..  : u.Tag): e.APTR;
  84. PROCEDURE DoSupermethod  * {"_a_DoSuperMethodA"}(cl{8}     : I.IClassPtr;
  85.                                                  obj{10}   : ObjectPtr;
  86.                                                  msg{9}..  : u.Tag);
  87. PROCEDURE SetSuperAttrs  * {"_a_SetSuperAttrs"}  (cl{8}    : I.IClassPtr;
  88.                                                   obj{10}  : ObjectPtr;
  89.                                                   tags{9}..: u.Tag): e.APTR;
  90. PROCEDURE SetSuperAttrsA * {"_a_SetSuperAttrs"}  (cl{8}    : I.IClassPtr;
  91.                                                   obj{10}  : ObjectPtr;
  92.                                                   tags{9}  : ARRAY OF u.TagItem): e.APTR;
  93. END Classface.
  94.